1. Field of the Invention
This invention relates a method and apparatus for controlling the assignment of units of work to a workload enclave in a client/server system and, more particularly, to a method and apparatus for associating multiple threads and processes created via a standard interface on behalf of a single user work request as a single "business unit of work" entity.
2. Description of the Related Art
Client/server systems are well known in the field of data processing. In a client/server system, a client process issues a request to a server process to perform a service for it. In response, the server transmits a reply to the client, notifying it of the results of the service.
There are many existing server applications which developers want to be able to execute on server systems of different capacities. These server applications need to scale with the size of the computer they are running on. The present invention addresses the problem of how to manage the workload resulting from thousands of concurrent requests to a server.
On UNIX-based systems, especially ones that are X/Open compliant, user work requests originates from many heterogeneous sources. Some of these include commands entered at an interactive terminal, client requests incoming to a server over a socket connection, or batch job submissions. In all of these cases, the resulting transaction or "business unit of work" may eventually be broken up into multiple dispatchable work units to complete the work request. For the purposes of this disclosure, a "business unit of work" is a single transaction that may consist of one or more dispatchable units of work. A dispatchable unit of work is a single thread of control within a given process. To create the dispatchable units of work that make up a "business unit of work", the following mechanisms are used on UNIX-based systems:
1. Create one or more new processes using fork(), vfork(), fork() and exec(), spawn(), popen(), system() or the equivalent to run one or more programs and/or scripts. PA1 2. Create one or more new threads in the running process using pthread.sub.-- create to run subroutines of the main thread routine. PA1 3. Create any combination of new threads and processes using both the thread creation and process creation mechanisms.
In the field of this invention, where multiple dispatchable units of work (threads and/or processes) are created to complete a single user work request, there needs to be a new mechanism for these related dispatchable units of work to be tied together into one "business unit of work" for system performance and accounting purposes.
This problem has not been previously solved on a UNIX-based system using the UNIX-based work unit creation mechanisms that are available on these systems.